import { E_EDUCATION_MODE, E_EDUCATION_ROLE } from '../enum/service-enum'
import { IDataWithError } from '../service-typing'

export interface IRegisterParam {
  name: string
  countryCode: string
  mobile: string
  verifyCode: string
  educationMode: E_EDUCATION_MODE
  educationRole: E_EDUCATION_ROLE
  registerType?: string
  source?: string
  terminalType?: string
  accountType?: number
  productId?: number
}

export interface IRegisterData {
  token: string
  umsUserId: number
}

export interface ILoginParam {
  countryCode: string
  mobile: string
  verifyCode: string
  productId?: number
}

export interface ILoginData {
  token: string
  tokenExpires: number
  refreshToken: string
  refreshTokenExpires: number
  umsUserId: number
}

export interface IAuthService {
  register(param: IRegisterParam): Promise<IDataWithError<IRegisterData>>
  login(param: ILoginParam): Promise<IDataWithError<ILoginData>>
}
